home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
fish
/
001-100
/
001-025
/
002
/
dbug
/
main.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-03-17
|
567b
|
28 lines
#include <stdio.h>
/* User programs should use <local/dbug.h> */
#include "dbug.h"
main (argc, argv)
int argc;
char *argv[];
{
register int result, ix;
extern int factorial (), atoi ();
DBUG_ENTER ("main");
DBUG_PROCESS (argv[0]);
for (ix = 1; ix < argc && argv[ix][0] == '-'; ix++) {
switch (argv[ix][1]) {
case '#':
DBUG_PUSH (&(argv[ix][2]));
break;
}
}
for (; ix < argc; ix++) {
DBUG_4 ("args", "argv[%d] = %s", ix, argv[ix]);
result = factorial (atoi (argv[ix]));
printf ("%d\n", result);
}
DBUG_RETURN (0);
}